// $Id: GroupPropertyEditor.java 26 2011-09-19 19:12:53Z huijzer@gmail.com $
package lime.group.editor;

import lime.common.LimeException;
import lime.model.Group;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.forms.editor.FormEditor;

public class GroupPropertyEditor extends FormEditor {
	
	public static final String ID = "lime.group.editor.property";
	
	@Override
	public void init(IEditorSite site, IEditorInput input) throws PartInitException {
		super.init(site, input);
		
		GroupInput groupInput = (GroupInput) input;
		Group group = groupInput.getGroup();
		setPartName(group.getObjectName());
	}
	
	@Override
	protected void addPages() {
		try {
			addPage(new GroupPropertyPage(this));
		} catch (PartInitException e) {
			throw new LimeException(e);
		}
		
	}

	@Override
	public void doSave(IProgressMonitor monitor) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void doSaveAs() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public boolean isSaveAsAllowed() {
		// TODO Auto-generated method stub
		return false;
	}

}
